// pages/express/index.js
const app = getApp();
Page({

    /**
     * 页面的初始数据
     */
    data: {
		StatusBar: app.globalData.StatusBar,		// 状态栏高度
		windowHeight: app.globalData.windowHeight,	// 屏幕整体高度
		scrollHeight:0,								// scroll高度
		
		// 用户发表的文字
		text:"In JavaScipt, labels are usually used with break and continue statements for interrupting execution of code and so on... But, is it a good idea to use labels for creating local variables that are available only inside these labels and for separating some piece code from another? Like this:",
	
		// 用户发布的图片集合, 最多九张
		pictures:["../../images/temp.png","../../images/temp.png","../../images/temp.png","../../images/temp.png","../../images/temp.png","../../images/temp.png","../../images/temp.png","../../images/temp.png","../../images/temp.png"], 	
		
	},
	
	
	goBack: function() {							// 返回键
		let pages = getCurrentPages(); //当前页面
		let beforePage = pages[pages.length - 2]; //前一页
		wx.navigateBack({
		  success: function () {
			beforePage.onLoad(); // 执行前一个页面的onLoad方法
		  }
		});
	},
	
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
		let that = this
		that.setData({
			scrollHeight:that.data.windowHeight-that.data.StatusBar,
		})
    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {

    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {

    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {

    }
})